package com.aube.interact.fighter.model;

import java.io.Serializable;
import java.util.HashMap;

/**
 * Created by huyaonan on 16/11/22.
 */
public class GameInfo implements Serializable {
    public String videoId;
    public int lastPosition;
    public int totalRewards;
    public HashMap<String, String> mAddedIds;

    public GameInfo(String videoId) {
        this.videoId = videoId;
        lastPosition = 0;
        totalRewards = 0;
        mAddedIds = new HashMap<>();
    }

    public boolean isAdded(String id) {
        if(mAddedIds == null)
            return false;
        return mAddedIds.containsKey(id);
    }

    public void addId(String id) {
        if(mAddedIds == null)
            mAddedIds = new HashMap<>();
        mAddedIds.put(id, id);
        totalRewards++;
    }

}
